<div class="page-center">
  <div class="main-page">
    <div class=" grid_12 t_space_bottom" id="container_1">
      <div class="breadcrumb"> <a href="<?php echo base_url(); ?>">Home</a> <span>&gt;</span>
        <style type="text/css">
			.breadcrumb{position:relative;height:50px;}
		</style>
        <b><?php echo $result['train_name']; ?></b>
        <div id="image-banner-breadcrumb" style="position:absolute;right:20px;top:0px;"><a href="<?php echo base_url(); ?>promotion/victoria-sapa-travel-package.html"><img style="width:700px;height:60px;" src="<?php echo base_url(); ?>public/images/VST_5_750x60px.jpg" /></a> </div>
      </div>
    </div>
    <div class=" grid_12 t_space_bottom" id="container_2">
      <link href="<?php echo base_url(); ?>public/styles/slide-train.css" type="text/css" rel="stylesheet">
      <style type="text/css">
		#date_19 + img,#date_20 + img {left: -2px;position: relative;top: 5px;}
		#ticket-total-bound{margin-bottom:10px;	}
		.left-ttb{float:left;}
		.right-ttb{float:right;}
		.num-pass{padding:0px;}
	  </style>
      <img id="loading-icon" src="<?php echo base_url(); ?>public/images/preloader_transparent.gif" style="position:fixed;left:50%;top:50%;display:none;"/>
      <div class="tab-train">
        <div class="head-tab line overflow">
          <ul class="list had" style="list-style:none;">
            <li id="li-tab1" class="active"><a href="#tab-overview" name="0" id="overview"><span><b>Overview</b></span></a></li>
            <li class=""><a href="#tab-economy" name="1"><span><b>Amenities</b></span></a></li>
            <li class=""><a href="#tab-premier" name="2"><span><b>Schedule</b></span></a></li>
            <li class=""><a href="#tab-faq" name="3"><span><b>Pros &amp; Cons</b></span></a></li>
            <li id="li-tab5" class="dark-gray"><a href="#tab-ready" name="4"><span><b>Ready to book?</b></span></a></li>
          </ul>
        </div>
        <!-- tab-overview -->
        <div class="tab-big had0 line" id="tab-overview" style="display: block;">
          <div class="bg-tab line" id="overview1" style="line-height:20px;">
            <div class="Fl col-495 ml30">
              <h1 style="font-size:17px;text-transform:uppercase"><?php echo $result['train_name']; ?></h1>
              <div class="trinfo" style="padding:10px 0px"><?php echo $result['train_overview']; ?></div>
              <p> <strong>News: Promotions</strong></p>
              <br />
              <a class="btn btn-red-45" href="#" id="btnNext"><span>Find Tickets</span></a> </div>
            <div class="slide-train"> 
              <script src="<?php echo base_url(); ?>public/scripts/jquery.easing.js" type="text/javascript"></script> 
              <script src="<?php echo base_url(); ?>public/scripts/script.js" type="text/javascript"></script> 
              <script type="text/javascript">
				 $(document).ready( function(){
						// buttons for next and previous item
						var buttons = { previous:$('#jslidernews1 .button-previous') ,
							next:$('#jslidernews1 .button-next') };
						 $('#jslidernews1').lofJSidernews( { interval : 4000,
						direction		: 'opacitys',
						easing			: 'easeInOutExpo',
						duration		: 1200,
						auto		 	: false,
						maxItemDisplay  : 4,
						navPosition     : 'horizontal', // horizontal
						navigatorHeight : 62,
						navigatorWidth  : 82,
						mainWidth		: 395,
						buttons			: buttons } );
					});
				</script>
              <div style="width:395px; height:235px;" class="lof-slidecontent" id="jslidernews1"> 
                <!-- MAIN CONTENT -->
                <div style="width:395px; height:235px;" class="main-slider-content">
                  <div class="sliders-wrapper" style="width: 395px;">
                    <?php 
					$folder = $result['train_folderimg'];
					$fullimg = unserialize($result['train_fullimg']);
					?>
                    <ul class="sliders-wrap-inner" style="left:-789.52px;width:2370px;">
                      <?php foreach($fullimg as $flimg){ ?>
                      <li style="width:395px;"> <img src="<?php echo base_url()."uploads/trains/".$folder."/".$flimg; ?>" width="395" height="235" alt="" />
                        <div class="slider-descript6ion">&nbsp;hidden</div>
                      </li>
                      <?php } ?>
                    </ul>
                  </div>
                </div>
                <!-- END MAIN CONTENT --> 
                <!-- NAVIGATOR -->
                <div class="navigator-content">
                  <div class="button-next">Next</div>
                  <div class="navigator-wrapper" style="width:328px;height:62px;">
                    <ul class="navigator-wrap-inner" style="width:492px;left:0px;">
                      <?php foreach($fullimg as $flimg){ ?>
                      <li style="height:62px;width:82px;" class=""><img src="<?php echo base_url()."uploads/trains/".$folder."/".$flimg; ?>" width="82" height="62" alt="" /></li>
                      <?php } ?>
                    </ul>
                  </div>
                  <div class="button-previous">Previous</div>
                </div>
                <!----------------- END OF NAVIGATOR ---------------------> 
                <!-- BUTTON PLAY-STOP -->
                <div class="button-control action-stop"><span></span></div>
                <!-- END OF BUTTON PLAY-STOP --> 
              </div>
            </div>
          </div>
          <div class="bg-tab line" id="overview2" style="display:none;"> </div>
        </div>
        <!--/ tab-overview --> 
        <!-- tab-economy -->
        <div style="display:none;" class="tab-big had1 line" id="tab-economy">
          <div class="bg-tab">
            <div style="padding:0px 25px 0px 25px;line-height:20px;"> <?php echo $result['train_amenities']; ?> </div>
          </div>
        </div>
        <!--/ tab-economy --> 
        
        <!-- tab-premier -->
        <div style="display:none;" class="tab-big had2 line" id="tab-premier">
          <div class="bg-tab line">
            <div style="padding:0px 25px 0px 25px;line-height:20px;"> <?php echo $result['train_schedule']; ?> </div>
          </div>
        </div>
        <!--/ tab-premier --> 
        
        <!-- tab-faq -->
        <div style="display: none;" class="tab-big had3 line" id="tab-faq">
          <div class="bg-tab line">
            <div style="padding:0px 25px 0px 25px;line-height:20px;"> <?php echo $result['train_pros']; ?> </div>
          </div>
        </div>
        <!--tab-faq --> 
        <!-- tab-ready -->
        <div style="display:none;" class="tab-big had4 line" id="tab-ready">
          <div class="bg-tab line"> 
            <!-- left-tab-content -->
            <div class="left-tab-content">
              <h3 class="size16 line15">Ticket search</h3>
              <div class="line">
                <div class="dash-small">All train service are provided by Victoria Express Train Train Company</div>
                <div class="dash-small">Cancellation and change policy<br>
                  are noted in our Terms &amp; Conditions</div>
                <p class="block tb10">
                  <label class="block lr14"> <a href="#"><img alt="" src="<?php echo base_url(); ?>public/images/card-master.jpg"></a> &nbsp; <a href="#"><img alt="" src="<?php echo base_url(); ?>public/images/card-maestro.jpg"></a> &nbsp; <a href="#"><img alt="" src="<?php echo base_url(); ?>public/images/card-visa.jpg"></a> </label>
                </p>
                <div class="clearfix"> 
                  <!--label class="clearfix lr14"> 
                    <!-- GeoTrust QuickSSL [tm] Smart  Icon tag. Do not edit. --> 
                  <!--script language="javascript" type="text/javascript" src="scripts/si.js"></script> 
                    <!-- end  GeoTrust Smart Icon tag --> 
                  <!--
                  </label--> 
                </div>
              </div>
            </div>
            <!--/ left-tab-content --> 
            
            <!-- right-tab-content -->
            <div class="right-tab-content">
              <div class="tab-child overflow">
                <ul class="list">
                  <li class="active"><a href="#overiew-routes"><span><b>Routes</b></span></a></li>
                  <li class=""><a href="#overiew-fearture"><span><b>Fearture</b></span></a></li>
                  <li class=""><a href="#overiew-eat-sleep"><span><b>Eat &amp; Sleep</b></span></a></li>
                  <li class=""><a href="#overiew-attractions"><span><b>Attractions</b></span></a></li>
                  <li class=""><a href="#overiew-direction"><span><b>Direction</b></span></a></li>
                </ul>
              </div>
              <div class="clear"></div>
              <!-- overiew-routes -->
               <script type="text/javascript">
				  $(document).ready(function(){
					  $(document).on("click",".radprice",function(){
						  $val = $(this).val();$trainame = $("#trainname").val();
						  $type = $(this).attr("datatype");$number = $("#adults").val();
						  $id  = $(this).attr("dataid");$depart = $("#tickstart").val();
						  $name = $(this).attr("dataname");$return = $("#tickend").val();
						  $from = $(this).attr("datafrom"); $to = $(this).attr("datato");
						  //alert($trainame); return false;
						  jQuery.post("<?php echo base_url()."home/cart/add"; ?>",{id:$id,type:$type,val:$val,name:$name,depart:$depart,returns:$return,number:$number,trainame:$trainame,from:$from,to:$to},function(result){
							  $("#lblPrice").html("$"+result);
							  $("#btnContinue").removeClass("none");
						  });
					  });
				  });
			   </script>
              <div class="tab-small clearfix" id="overiew-routes" style="display: block;">
                <form id="frmContinue" name="frmContinue" action="" method="post">
                  <p class="line25"> <b>Hanoi - Sapa on  <?php echo $result['train_name']; ?> </b> </p>
                  <p class="line12"> Departing:
                  	<input type="hidden" id="trainname" value="<?php echo $result['train_name']; ?>" />
                    <input type="text" value="<?php echo $curstart; ?>" id="tickstart" class="input-text hadate">
                    <img class="ui-datepicker-trigger" src="<?php echo base_url() ?>public/images/calenda.jpg" alt="..." title="..."> </p>
                  <table class="tableStyle">
                    <tbody>
                      <tr>
                        <th>Departs</th>
                        <th>Arrives</th>
                        <th>Duration</th>
                        <th>Train</th>
                        <th>Soft Seat</th>
                        <th>Hard Berth</th>
                        <th>Soft berth</th>
                        <th>Vip Berth</th>
                      </tr>
                      <?php if(isset($liststart) && $liststart != NULL){ ?>
                      <?php foreach($liststart as $tickstart){ ?>
                      <tr>
                        <td><?php echo $tickstart['tickdeparts']; ?></td>
                        <td><?php echo $tickstart['tickarrives']; ?></td>
                        <td><?php echo $tickstart['tickduration']; ?></td>
                        <td><a title="" target="_blank">SP3</a></td>
                        <td><?php if($tickstart['softseat'] != 0){ echo "<span><input class='radprice' datatype='1' datafrom='Hanoi' datato='Sapa' dataname='Soft Seat' dataid='".$tickstart['tickid']."' value='".$tickstart['softseat']."' name='rooms".$tickstart['tickid']."' type='radio' />&nbsp;$".$tickstart['softseat']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickstart['hardberth'] != 0){ echo "<span><input class='radprice' datatype='1' datafrom='Hanoi' datato='Sapa' dataname='Hard Berth' dataid='".$tickstart['tickid']."' value='".$tickstart['hardberth']."' name='rooms".$tickstart['tickid']."' type='radio' />&nbsp;$".$tickstart['hardberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickstart['softberth'] != 0){ echo "<span><input class='radprice' datatype='1' datafrom='Hanoi' datato='Sapa' dataname='Soft berth' dataid='".$tickstart['tickid']."' value='".$tickstart['softberth']."' name='rooms".$tickstart['tickid']."' type='radio' />&nbsp;$".$tickstart['softberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickstart['vipberth'] != 0){ echo "<span><input class='radprice' datatype='1' datafrom='Hanoi' datato='Sapa' dataname='Vip Berth' dataid='".$tickstart['tickid']."' value='".$tickstart['vipberth']."' name='rooms".$tickstart['tickid']."' type='radio' />&nbsp;$".$tickstart['vipberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                      </tr>
                      <?php } }else{ ?>
                      <tr>
                        <th colspan="8" style="background:none;color:#000">No tickets available</th>
                      </tr>
                      <?php } ?>
                    </tbody>
                  </table>
                  <p class="line25"> <b>Sapa - Hanoi on  <?php echo $result['train_name']; ?> </b> </p>
                  <p class="line12"> Return:
                    <input type="text" value="<?php echo $curendate; ?>" id="tickend" class="input-text hadate">
                    <img class="ui-datepicker-trigger" src="<?php echo base_url() ?>public/images/calenda.jpg" alt="..." title="..."> </p>
                  <table class="tableStyle">
                    <tbody>
                      <tr>
                        <th>Departs</th>
                        <th>Arrives</th>
                        <th>Duration</th>
                        <th>Train</th>
                        <th>Soft Seat</th>
                        <th>Hard Berth</th>
                        <th>Soft berth</th>
                        <th>Vip Berth</th>
                      </tr>
                      <?php if(isset($listend) && $listend != NULL){ ?>
                      <?php foreach($listend as $tickend){ ?>
                      <tr>
                        <td><?php echo $tickend['tickdeparts']; ?></td>
                        <td><?php echo $tickend['tickarrives']; ?></td>
                        <td><?php echo $tickend['tickduration']; ?></td>
                        <td><a title="" target="_blank">SP3</a></td>
                        <td><?php if($tickend['softseat'] != 0){ echo "<span><input class='radprice' datatype='2' datafrom='Sapa' datato='Hanoi' dataname='Soft Seat' dataid='".$tickend['tickid']."' value='".$tickend['softseat']."' name='rooms".$tickend['tickid']."' type='radio' />&nbsp;$".$tickend['softseat']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickend['hardberth'] != 0){ echo "<span><input class='radprice' datatype='2' datafrom='Sapa' datato='Hanoi' dataname='Hard Berth' dataid='".$tickend['tickid']."' value='".$tickend['hardberth']."' name='rooms".$tickend['tickid']."' type='radio' />&nbsp;$".$tickend['hardberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickend['softberth'] != 0){ echo "<span><input class='radprice' datatype='2' datafrom='Sapa' datato='Hanoi' dataname='Soft berth' dataid='".$tickend['tickid']."' value='".$tickend['softberth']."' name='rooms".$tickend['tickid']."' type='radio' />&nbsp;$".$tickend['softberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                        <td><?php if($tickend['vipberth'] != 0){ echo "<span><input class='radprice' datatype='2' datafrom='Sapa' datato='Hanoi' dataname='Vip Berth' dataid='".$tickend['tickid']."' value='".$tickend['vipberth']."' name='rooms".$tickend['tickid']."' type='radio' />&nbsp;$".$tickend['vipberth']."</span>"; }else{ echo "<span>N/A</span>";} ?></td>
                      </tr>
                      <?php } }else{ ?>
                      <tr>
                        <th colspan="8" style="background:none;color:#000">No tickets available</th>
                      </tr>
                      <?php } ?>
                    </tbody>
                  </table>
                  <div id="ticket-total-bound">
                    <div class="left-ttb" style="float:left">
                      <div class="line num-pass">
                        <h3 class="line6">Number of Passengers</h3>
                        <select class="Fl" id="adults" name="adults">
                          <option value="1">1</option>
                          <option value="2">2</option>
                          <option value="3">3</option>
                          <option value="4">4</option>
                          <option value="5">5</option>
                          <option value="6">6</option>
                          <option value="7">7</option>
                          <option value="8">8</option>
                          <option value="9">9</option>
                        </select>
                      </div>
                    </div>
                    <div class="right-ttb" style="float:right;">
                      <p align="right" class="lineH16 line"> <b class="size13 line3">Ticket Total:
                        <label id="lblPrice">$ 0</label>
                        </b><br>
                        <span class="c_a0">* This price is exclusive of credit card processing fee (4%).</span> </p>
                    </div>
                  </div>
                  <span id="lblPrice" style="display:none;"></span>
                  <p class="line">
                    <a href="<?php echo base_url()."extra-services.html?train=".$result['train_id']; ?>" class="btn btn-red continue none" id="btnContinue"><span>Continue</span></a>
                  </p>
                </form>
              </div>
              <!--/ overiew-routes -->
              <div style="display: none;" class="tab-small clearfix" id="overiew-fearture"> </div>
              <!--/ overiew-fearture -->
              <div style="display: none;" class="tab-small clearfix" id="overiew-eat-sleep"> </div>
              <div style="display: none;" class="tab-small clearfix" id="overiew-attractions"> </div>
              <div style="display: none;" class="tab-small clearfix" id="overiew-direction"> </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("ul.had li a").click(function(){
		$stt = $(this).attr("name");
		$(".active").removeClass("active");
		$(this).parent().addClass("active");
		$(".tab-big").hide();
		$(".had"+$stt).show();
		return false;
	});
});
</script>
<div class="page-center">
  <div class="signup-offer">
    <div class="signup-banner"> <b class="inline-block size16">Have any questions? Please contact us</b> <a class="button btn-offer" href="<?php echo base_url(); ?>contact.html">Contact us</a> <span class="inline-block size11">Don't worry, we won't share your details with anyone alse</span> </div>
  </div>
  <!--/ SIGN UP - OFFER --> 
</div>
